<%--
  Created by IntelliJ IDEA.
  User: x'z'y
  Date: 2020/9/7
  Time: 21:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="page_nav">
    <c:if test="${requestScope.page.pageOn>1}">
        <a href="${requestScope.page.url}&pageOn=1">首页</a>
        <a href="${requestScope.page.url}&pageOn=${requestScope.page.pageOn-1}">上一页</a>
        <a href="${requestScope.page.url}&pageOn=${requestScope.page.pageOn-1}">${requestScope.page.pageOn-1}</a>
    </c:if>

    [<a href="${requestScope.page.url}&pageOn=${requestScope.page.pageOn}">${requestScope.page.pageOn}</a>]


    <c:if test="${requestScope.page.pageOn<requestScope.page.totalPage}">
        <a href="${requestScope.page.url}&pageOn=${requestScope.page.pageOn+1}">${requestScope.page.pageOn+1}</a>
        <a href="${requestScope.page.url}&pageOn=${requestScope.page.pageOn+1}">下一页</a>
        <a href="${requestScope.page.url}&pageOn=${requestScope.page.totalPage}">末页</a>
    </c:if>

    共${requestScope.page.totalPage}页，${requestScope.page.totalCount}条记录 到第
    <input value="${requestScope.page.pageOn}" name="pn" id="pn_input"/>页
    <input id="page_button" type="button" value="确定">
    <script type="text/javascript">

        $(function () {
            $("#page_button").click(function () {
                var imput=$("#pn_input").val();
                if(imput>${requestScope.page.totalPage}){
                    imput = ${requestScope.page.totalPage}
                }
                if(imput<1){
                    imput=1;
                }
                location.href="${requestScope.page.url}&pageOn="+imput;
            })
        })

    </script>



</div>